using IcsSEMCtrl.Event.Device;
using System;
namespace Lifter.Event.Lifter
{
    [Serializable]
    public class VehicleLocationEvent : DeviceEvent
    {
        public static readonly string CLASS = "VehicleLocationEvent";
        public static readonly string SPECIFIC_SUBJECT = "VehicleLocation";
        public new static readonly string SUBJECT = DeviceEvent.SUBJECT + "." + VehicleLocationEvent.SPECIFIC_SUBJECT;
        private string vehicleId;
        private short vehicleLocation = 0;
        private short vehiclePosition = 0;
        public string VehicleId
        {
            get
            {
                return this.vehicleId;
            }
            set
            {
                this.vehicleId = value;
            }
        }
        public short VehicleLocation
        {
            get
            {
                return this.vehicleLocation;
            }
            set
            {
                this.vehicleLocation = value;
            }
        }
        public short VehiclePosition
        {
            get
            {
                return this.vehiclePosition;
            }
            set
            {
                this.vehiclePosition = value;
            }
        }
        public VehicleLocationEvent(string deviceId, string deviceType, string vehicleId, short vehicleLocation) : base(deviceId, deviceType)
        {
            this.vehicleId = vehicleId;
            this.vehicleLocation = vehicleLocation;
        }
        public VehicleLocationEvent(string deviceId, string deviceType, short vehiclePosition) : base(deviceId, deviceType)
        {
            this.vehicleId = "VEHICLE:1";
            this.vehiclePosition = vehiclePosition;
        }
        protected new string CreateSubject(string id)
        {
            return VehicleLocationEvent.FormSubject(id);
        }
        public new static string FormSubject(string id)
        {
            return VehicleLocationEvent.SUBJECT + "." + id;
        }
    }
}
